


        var hDelay = null;
        var preventWatching = false;
        var watchingPage = null;

        $(document).ready(function(){
            $('main .content .info .dtls .palace ul').height(($('main .content .info .dtls .palace ul li').eq(0)[0].offsetHeight));
            $('main .content .info .dtls .palace ul li:eq(0)').addClass('active');
            watchingPage = setInterval(function(){
                if(preventWatching) return false;
                if($('main .content .info .dtls .palace ul').height() != $('main .content .info .dtls .palace ul li.active')[0].offsetHeight){
                    $('main .content .info .dtls .palace ul').height($('main .content .info .dtls .palace ul li.active')[0].offsetHeight);
                }
            },10)
               $('main .content .info .dtls nav p').mouseenter(function(){
                    clearTimeout(hDelay);
                    preventWatching = true;
                    var ind = $(this).index();
                    $('main .content .info .dtls .palace ul li').removeClass('active');
                    $('main .content .info .dtls .palace ul li').eq(ind - 1).addClass('active');
                    $('main .content .info .dtls nav span')[0].style.transform = 'translateX(' + (ind - 1) * 100 + '%)';
                    $('main .content .info .dtls .palace ul')[0].style.transform = 'translateX(-' + (100 / 3 * (ind - 1)).toFixed(6) + '%)';
                    var h = $('main .content .info .dtls .palace ul li').eq(ind - 1)[0].offsetHeight;
                    $('main .content .info .dtls .palace ul').height(h);
                    hDelay = setTimeout(function(){
                        preventWatching = false;
                    },610)
               })

        })